<div class="question" id="question-<?=$question['Question']['id']?>" width="100%" cellspacing="0" cellpadding="0" >
    <div class="title">
        <?=$question['Question']['title']?>
    </div>
    <div class="option-list">
        <ul>
            <?php 
            $questions = QuestionOption::get_options_by_question($question['Question']['id']);
            $type = "radio";
            if ($question['Question']['type']==Question::CHECKBOX) {
                $type="checkbox";
            }    
            foreach ($questions as $value) { 
                ?>
                <li class="option" ><input type="<?=$type?>" value="<?=$value['Option']['id']?>" name='<?php if($type=="radio"){ echo "Question[{$question['Question']['id']}][answer]"; }else{ echo "Question[{$question['Question']['id']}][answer][]"; } ?>' /> <?=$value['Option']['title']?></li>    
            <?php    }
            ?>
            <?php if($question['Question']['has_other']==1){?>
                <li class="option" ><input type="<?=$type?>" value="other" name='<?php if($type=="radio"){ echo "Question[{$question['Question']['id']}][answer]"; }else{ echo "Question[{$question['Question']['id']}][answer][]"; } ?>' /> Other : <input type="text" style="width:360px" name="Question[<?=$question['Question']['id']?>][other]" class="long-text input-form"/></li>    
            <?php } ?>
        </ul>
    </div>
</div